package com.jeesite.modules.em;

import lombok.Getter;

@Getter
public enum WeiquanStatus {
    SHENSUZHONG("1","申诉审核中","用户申诉"),
    TONGUO("2","通过","商家通过"),
    JIEDAN("3","用户结单",""),
    BOHUI("4","驳回","商家驳回"),
    PINGTAI("5","平台审核中","平台审核中"),
    PINGTAITONGGUO("6","平台裁定通过",""),
    PINGTAIBOHUI("7","平台裁定驳回",""),
    ;

    private final String code;

    private final String message;

    private final String message2;

    private WeiquanStatus(String code, String message, String message2) {
        this.code = code;
        this.message = message;
        this.message2 = message2;
    }

    //遍历枚举V2
    public static WeiquanStatus getWeiquanStatus(String code)
    {
        for (WeiquanStatus element : WeiquanStatus.values()) {
            if(element.getCode().equalsIgnoreCase(code))
            {
                return element;
            }
        }
        return null;
    }
    //遍历枚举V2
    public static String getWeiquanStatusSecond(String code)
    {
        for (WeiquanStatus element : WeiquanStatus.values()) {
            if(element.getCode().equalsIgnoreCase(code))
            {
                return element.getMessage();
            }
        }
        return null;
    }
}
